# Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

project(cmsis-nimble-port LANGUAGES C)

FetchContent_GetProperties(mynewt-nimble)

add_subdirectory(cmsis-npl)
add_subdirectory(pw_logging)

add_library(cmsis-nimble-port)

target_sources(cmsis-nimble-port
    PRIVATE
        src/iotsdk_nimble.c
)

target_include_directories(cmsis-nimble-port
    PUBLIC
        inc
    PRIVATE
        ${mynewt-nimble_SOURCE_DIR}/nimble/include
        ${mynewt-nimble_SOURCE_DIR}/nimble/host/include
        ${mynewt-nimble_SOURCE_DIR}/nimble/host/util/include
        ${mynewt-nimble_SOURCE_DIR}/nimble/host/services/gap/include
        ${mynewt-nimble_SOURCE_DIR}/nimble/host/services/gatt/include
        ${mynewt-nimble_SOURCE_DIR}/nimble/transport/include
)

target_link_libraries(cmsis-nimble-port
    PUBLIC
        cmsis-npl
)
